-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: maintain dependabot config filename for existing configs #150
Conversation
Signed-off-by: Zack Koppert <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. gonna approve since you're already gonna fix the filepath issue.
@jmeridth I ended up down a bit of a rabbit hole with this one. I re-requested your review because I changed more than I advertised. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple questions/suggestions
Co-authored-by: jmeridth <[email protected]> Signed-off-by: Zack Koppert <[email protected]>
Signed-off-by: Zack Koppert <[email protected]>
Pull Request
Proposed Changes
In order for us to handle existing configuration files properly, we need to ensure we are making a pull request against the existing configuration and not a new file. This is occurring currently when the file dependabot.yml has a slightly different extension (.yaml).
Minor Changes:
Updates to GitHub Token and Commit Message:
README.md
: TheGH_TOKEN
description is updated to specify that it must also haverepo:write
andworkflow
privileges to create a pull request.env.py
: The default commit message is changed from "Create dependabot.yaml" to "Create/Update dependabot.yaml".Most significant changes:
Changes in
dependabot_file.py
:make_dependabot_config
now takes an additionalindent
parameter to control the indentation of the generateddependabot.yaml
content.build_dependabot_file
function has been updated to calculate the indentation based on the existingdependabot.yaml
file, if it exists.build_dependabot_file
function now passes the calculatedindent
tomake_dependabot_config
when adding new package managers to thedependabot.yaml
file. [1] [2] [3]Changes in
evergreen.py
:main
function now keeps track of the filename of the existingdependabot.yaml
file, if it exists.dependabot.yaml
file is now included in the issue body when creating an issue.commit_changes
function now takes additional parameters for the filename of thedependabot.yaml
file and the existing configuration. If the configuration exists, it updates the file; otherwise, it creates a new one. [1] [2]Readiness Checklist
Author/Contributor
make lint
and fix any issues that you have introducedmake test
and ensure you have test coverage for the lines you are introducing@jeffrey-luszcz
Reviewer
fix
,documentation
,enhancement
,infrastructure
,maintenance
orbreaking